using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class FireGun : Weapon
{
    void Start()
    {
        mass = 2;
        fireSpeed = 0.8f;
    }

    public override void Fire(Transform Bullet, Vector2 vec, float lastFireTime)
    {
        if (Time.time - lastFireTime < 1 / fireSpeed)
        {
            return;
        }
        else
        {
            GameObject.Find("Player").GetComponent<Player>().lastFireTime = Time.time;
        }
        Instantiate(Bullet, GameObject.Find("Player").transform, false);
    }
}
